package com.zhengke.service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zhengke.dao.ISalesDao;
import com.zhengke.pojo.SysDictionaryItem;
@Service
public class SaleServiceImpl implements ISaleService {
	@Autowired
	private ISalesDao dao;
	
	/**
	 * 查询后台设置排序方式
	 * @return
	 */
	@Override
	public List<SysDictionaryItem> findDicItem() {
		return dao.findDicItem();
	}
	/**
	 * 查询销售排行商品
	 * @return
	 */
	@Override
	public List<Map<String, Object>> querySalesList(String pointId, String type) {
		// TODO Auto-generated method stub
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("pointId", pointId);
		map.put("type", type);
		return dao.querySalesList(map);
	}
	/**
	 * 查询销售排行商品(手动设置排序)
	 * @return
	 */
	@Override
	public List<Map<String, Object>> querySalesList2(String pointId) {
		// TODO Auto-generated method stub
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("pointId", pointId);
		return dao.querySalesList2(map);
	}
	/**
	 * 查询销售排行商品(手动设置排序)
	 * @return
	 */
	@Override
	public List<Map<String, Object>> querySalesList3() {
		// TODO Auto-generated method stub
		
		return dao.querySalesList3();
	}

}
